Class_name = "CTurret"
object_name = "Turret_Me410A1"

[COCKPIT_LIMITS]
x= -0.19, 0.24
y= -0.2, 0.18
z= -0.38, 0.3
[END]

[OPEN_COCKPIT_LIMITS]
x= -0.28, 0.06
y= -0.03, 0.2
z= -0.3, 0.50
[END]

VisualImage=0,"graphics/planes/Me410A1/Me410A1-C1-low.mgm",65
VisualImage=1,"graphics/planes/Me410A1/Me410A1-C1.mgm",false
KeepNetworkImages=true

//VisualImage=ID,model_or_effect,cast_shadows[,debris_effects]
//ID:					INT:	0 - visible everywhere, 1 - visible inside, 2 - visible outside
//model_or_effect:		STRING:	path to model file (mgm) of effect file (epl)
//cast_shadows: 		BOOL/INT:	cast shadows from object or not (cast_shadows=Attr1+Attr2+...+AttrN)
//						VIF_CASTSHADOWS=1,
//						VIF_BLENDMASKLAST=2,
//						VIF_ALWAYSONTOP=4,
//						VIF_FLATAMBIENT=8,
//						VIF_DONTCAST_COCKPIT_SHADOWS=16,
//						VIF_GRASS_CAPSULES=32,
//						VIF_COCKPIT_SHADOWS_OUTSIDE=64
//[,debris_effects]:	BOOL:	optional parameter, show effects on object debris or not

CollisionBody="graphics/planes/Me410A1/Me410A1-C1.col"

VisualRadius=2.0

mp_site=true

Script="LuaScripts\ObjectScripts\Planes\Me410A1_T.sc"

[attach=0]
	position = -0.04,0.33,0.04
	object = "LuaScripts/WorldObjects/Bots/BotGunner_Me410A_GER44.txt"
	rotation= 0, 0, 0
[end]

[attach=1]
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretRiffle.txt"
[end]

[attach=2]
	position = 0.0, 0.0, -0.2
	rotation = -90,90,0
	object = "LuaScripts/WorldObjects/TurretCameraByAttach.txt"
	convex="sight1",false	//false: Attach object relative to convex (not absolute)
[end]

[attach=3]
	position = 0.0, 0.0, 0.0
	rotation = -90,90,0
	object = "LuaScripts/WorldObjects/Planes/Sights/GunSightMe410A1_T.txt"
	convex="sight1",false	//false: Attach object relative to convex (not absolute)
[end]

[attach=4]
	position = 0.0, 0.0, -0.2
	rotation = -90,90,0
	object = "LuaScripts/WorldObjects/TurretCameraByAttach.txt"
	convex="sight0",false	//false: Attach object relative to convex (not absolute)
[end]

[attach=5]
	position = 0.0, 0.0, 0.0
	rotation = -90,90,0
	object = "LuaScripts/WorldObjects/Planes/Sights/GunSightMe410A1_T.txt"
	convex="sight0",false	//false: Attach object relative to convex (not absolute)
[end]

[attach=6]
	position = 0.0, 0.0, -0.2
	rotation = -90,90,0
	object = "LuaScripts/WorldObjects/TurretCameraByAttach.txt"
	convex="sight3",false	//false: Attach object relative to convex (not absolute)
[end]

[attach=7]
	position = 0.0, 0.0, 0.0
	rotation = -90,90,0
	object = "LuaScripts/WorldObjects/Planes/Sights/GunSightMe410A1_T.txt"
	convex="sight3",false	//false: Attach object relative to convex (not absolute)
[end]

[attach=8]	//     Secondary Turret Pos
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretRiffle.txt"
[end]

[attach=9]	//     Secondary Turret Pos
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretRiffle.txt"
[end]

//TargetingScript = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_GER_7-92x57_APsmk.bin"
TargetingScript = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_GER_13x64_AP.bin"
SoundScript="LuaScripts/Sound/Planes/Me410A1_T.cfg"

DropsArg=100
HumidityArg=101

SetCockpitArgs=false	// true -             , false -              

//CockpitArg= FetchType, CmdID, SubcmdID, ArgNum, ArgValDefault, SmoothingType, SmoothingPower, NetworkFlag
//FetchType=-1:       
//FetchType=-2:         
//FetchType=-3:          parent-
//FetchType>=0:          child-   Attach ID
//CmdID=[0..999]: ID    ,    .
//CmdID=[1000..1999]: ID    ,    .
//SubcmdID=[0..3]: ID     .
//SubcmdID=[0..1]: ID     .
//ArgNum:     / .
//ArgValDefault:      ,    .
//SmoothingType: smooth_clamp -  - 
//SmoothingType: smooth_wrap -   
//SmoothingPower:   
//NetworkFlag="":           ,  SetCockpitArgs=false
//NetworkFlag="low_freq":     ,       ,    
//NetworkFlag="med_freq":     ,       ,    
//NetworkFlag="high_freq":     ,       ,    
//NetworkFlag="granted_single":     ,       ,     

CockpitArg = -3, 0500, 0, 22042, 0.0, "smooth_clamp", 0.0, "" // /  
CockpitArg = -3, 0500, 1, 22052, 0.0, "smooth_clamp", 0.0, "" // /  

CockpitArg = -3, 0430, 0, 02509, 0.0, "smooth_clamp", 0.0, "granted_single" //  
CockpitArg = -3, 0430, 1, 60210, 0.0, "smooth_clamp", 0.0, "granted_single" //   

CockpitArg = -3, 0434, 0, 06009, 0.0, "smooth_clamp", 0.2, "" //    ("")
CockpitArg = -3, 0434, 1, 06010, 0.0, "smooth_clamp", 0.2, "" //   
CockpitArg = -3, 0434, 2, 06011, 0.0, "smooth_clamp", 0.2, "" //    ("  ")
CockpitArg = -3, 0434, 3, 06012, 0.0, "smooth_clamp", 0.2, "" //   

CockpitArg = -3, 0601, 1, 09103, 0.0, "smooth_clamp", 0.1, "granted_single" //   

CockpitArg = -3, 0850, 2, 07002, 0.0, "smooth_clamp", 0.2, "low_freq" //    

[TurretsPos=0]
	position = 0.566253, 1.020113, 0.25705
	PosMoveArg = 21000
	SeatArg=22111
	SeatUpTime=2.0
	SeatDownTime=2.0
	defaultturretpos = true

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0
	LegsParameter = 0.0
	BotMinFirstAngle  = -45
	BotMaxFirstAngle  = 45
	BotMinSecondAngle = -90
	BotMaxSecondAngle = 90
	FirstToSecondInterp = 0.0
	
	LockTurretCamera=false
	
	// Joints in orientation order!!!

	[Joint=0]
		SectorAngleMin = -80.0
		SectorAngleMax = 41.0
		DefaultPos = 0.661157

		AngularSpeed   = 60.0

		AnimationArgMin = 0.055556
		AnimationArgMax = 0.727778

		AnimationArgNum = 21007

		Point = 0,0,0
		Axis  = 0.0,0.0,1.0

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = -40.0
		SectorAngleMax = 40.0
		DefaultPos = 0.5

		AngularSpeed = 60.0

		AnimationArgMin = 0.277778
		AnimationArgMax = 0.722222

		AnimationArgNum = 21006

		Point = 0, 0, 0
		Axis  = 0.0,1.0,0.0

		SoundNumber = 2

		NoMoveFar=true	// Block rotation when the target is in the rear henisphere
	[end]

	relativeBotStand = 0.0, 0.0, 0.0
	relativeBotSit = 0.0, 0.0, 0.0
	relativeBotDead = 0.0, 0.0, 0.0
	TransitionStandPower = 1
	TransitionDeadPower = 1

	BotAttachJointId = 0
	BotFirstAnimJointId = 1
	BotSecondAnimJointId  = 0

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 1.0, 0.0, 0.0
	AimSector=-45, 45, -40, 90	//AI aim limits: left, right, down, up

	CamDisplacement = 0, 0.2, -0.25705
[end]

[TurretsPos=1]
	SecondaryPos=true
	LockShootIfLimited=true
	position = 2.417834,0.30077,0.0

	SeatUpTime=2.0
	SeatDownTime=2.0

	ReloadDelay = 0.3

	// Joints in orientation order!!!

	[Joint=0]
		SectorAngleMin = -80.0
		SectorAngleMax = 41.0
		DefaultPos = 0.661157

		AngularSpeed   = 120.0

		AnimationArgMin = 0.055556
		AnimationArgMax = 0.727778

		AnimationArgNum = 22007

		Point = 0.189305,0.0,0.447836
		Axis  = 0.0,0.0,1.0
	[end]

	[Joint=1]
		SectorAngleMin = -3.0
		SectorAngleMax = 40.0
		DefaultPos = 0.069767

		AngularSpeed = 60.0

		AnimationArgMin = 0.483333
		AnimationArgMax = 0.722222

		AnimationArgNum = 22006

		Point = 0,0,0
		Axis  = 0.0,1.0,0.0
	[end]

	[GunAnimation=0]
		FireArg = 9213
	[end]

	FireLightArg=60230

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 1.0, 0.0, 0.0
[end]

[TurretsPos=2]
	SecondaryPos=true
	LockShootIfLimited=true
	position = 2.417834,0.30077,0.0

	SeatUpTime=2.0
	SeatDownTime=2.0

	ReloadDelay = 0.3

	// Joints in orientation order!!!

	[Joint=0]
		SectorAngleMin = -80.0
		SectorAngleMax = 41.0
		DefaultPos = 0.661157

		AngularSpeed   = 120.0

		AnimationArgMin = 0.055556
		AnimationArgMax = 0.727778

		AnimationArgNum = 23007

		Point = 0.189304,0.0,-0.447795

		Axis  = 0.0,0.0,1.0
	[end]

	[Joint=1]
		SectorAngleMin = -40.0
		SectorAngleMax = 3.0
		DefaultPos = 0.930233

		AngularSpeed = 60.0

		AnimationArgMin = 0.277778
		AnimationArgMax = 0.516667

		AnimationArgNum = 23006

		Point = 0,0,0
		Axis  = 0.0,1.0,0.0
	[end]

	[GunAnimation=0]
		FireArg = 9113
	[end]

	FireLightArg=60220

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 1.0, 0.0, 0.0
[end]

[TurretsGun=0]
	LinkedTurretPos = 1
//	Convex = "~gun0"
	DGroup="MachineGun1"
	DamageProp = 0.25

	Displacement = 0.79,0.0,0.00104
	GunsightPosition = 0.0,0.0,0.00104
	ParallaxDistance = 400.0

	GunType = "LuaScripts/WorldObjects/Weapons/MG_GER_MG131.txt"

	ReLoadingStagesTime = 1.0, 3.0, 1.0, 0.3

//	ReservedMagazinesArgIdx = 0			// not used
//	FlashAnimationArgIdx = 9113
	TriggerPositionArgIdx = 9002
	RoundsInMagazineArgIdx = 9311
//	AmmunitionMovingArgIdx = 0			// not used
//	HideAmmunitionArgIdx = 0			// not used
//	ReLoadingArgIdx = 0					// not used
//	AzimuthDeviationArgIdx = 0			// not used
//	ElevationDeviationArgIdx = 0		// not used
	FiringPinPositionArgIdx = 19303
//	DrawAnimationArgIdx = 0, 9105

	BarrelTemperatureDecreaseCorrectionData = 1.0, 4.0, 300.0 //         :
	//   -        , [.], (>=0), default = 1
	//   -        ,       ,   , [.], (>=  ),  : 1.0
	//   -      ,              , [/], (>=0),  : 0.0

	CarriageAdditionalBulletDispertionAngle = 0.0239, 0.0669 //     ()     ,      :
	//   -        , [], (>=0)
	//   -          , [], (>=  )

	NumOfAnimations = 4

	BushOnJoint = false
	BushCoord = 2.469,-0.256,0.196
	BushSpeed = 0.0, -1.5, 0,0
	BushConfig = "LuaScripts/WorldObjects/Trash/Batch_case12-20mm.txt"

	SoundNumber = 1
[end]

[TurretsGun=1]
	LinkedTurretPos = 2
//	Convex = "~gun1"
	DGroup="MachineGun2"
	DamageProp = 0.25

	Displacement = 0.79,0.0,0.000612
	GunsightPosition = 0.0,0.0,0.000612
	ParallaxDistance = 400.0

	GunType = "LuaScripts/WorldObjects/Weapons/MG_GER_MG131.txt"

	ReLoadingStagesTime = 1.0, 3.0, 1.0, 0.3

//	ReservedMagazinesArgIdx = 0			// not used
//	FlashAnimationArgIdx = 9113
	TriggerPositionArgIdx = 9001
	RoundsInMagazineArgIdx = 9211
//	AmmunitionMovingArgIdx = 0			// not used
//	HideAmmunitionArgIdx = 0			// not used
//	ReLoadingArgIdx = 0					// not used
//	AzimuthDeviationArgIdx = 0			// not used
//	ElevationDeviationArgIdx = 0		// not used
	FiringPinPositionArgIdx = 19203
//	DrawAnimationArgIdx = 0, 9105

	BarrelTemperatureDecreaseCorrectionData = 1.0, 4.0, 300.0 //         :
	//   -        , [.], (>=0), default = 1
	//   -        ,       ,   , [.], (>=  ),  : 1.0
	//   -      ,              , [/], (>=0),  : 0.0

	CarriageAdditionalBulletDispertionAngle = 0.0239, 0.0669 //     ()     ,      :
	//   -        , [], (>=0)
	//   -          , [], (>=  )

	NumOfAnimations = 4

	BushOnJoint = false
	BushCoord = 2.462,-0.275,-0.047
	BushSpeed = 0.0, -1.5, 0,0
	BushConfig = "LuaScripts/WorldObjects/Trash/Batch_case12-20mm.txt"

	SoundNumber = 2
[end]

[Ammunition0]
	GunAmmunition0=0
	GunAmmunition1=0
[end]
[GunAmmunition0]
	MaxRoundsInMagazine = 500
	RoundsInMagazine = 500
	MaxReservedMagazines = 0
	ReservedMagazines = 0
	MaxMisFiresInMagazine = 0
	AmountRoundsWithOneTracer = 2
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_GER_13x64_AP.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_GER_13x64_AP.txt"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_GER_13x64_HE.txt"
[end]

SightPos = 0.0, 0.2, 0.0
PositionChangeTime = 1.0
StandDuration = 1.0
SitDuration = 1.0
PreEjectDuration = 1.0

//   ,         
//SectorLimits = -180.0, -35.0,  -5.0,  +90.0

[Entrance]
	EntrancePos= -0.04,0.33,0.04
	EntranceRot= 0,180,0
	JumpDir=0,2,3
[end]
[Entrance]
	EntrancePos= -0.04,0.33,0.04
	EntranceRot= 0,0,0
	JumpDir=-2,6,1
	SelectorDir=0,2,0	//        2/
[end]
EjectOnlyAfterPreviousGunner = false

// Damage

CockpitSafetyRate = 0.35 //impact accelerations affect on bot treshold multiplifier (default is =1.0)

SphereHitProtection=0	//  /     

[SphereProtectionBoxOpen]	//    ,        ,   ,     SphereHitProtection=
	FovH=90					//          ,     ,  ArmorFront
	FovV=90					//          ,     ,  ArmorFront
							//  5        
	ArmorFront=9
	ArmorBack=9
	ArmorTop=0
	ArmorBottom=6
	ArmorRight=0
	ArmorLeft=0
[end]

[SphereProtectionBoxClose]	//    ,        ,   ,     SphereHitProtection=
	FovH=90					//          ,     ,  ArmorFront
	FovV=90					//          ,     ,  ArmorFront
							//  5        
	ArmorFront=9
	ArmorBack=9
	ArmorTop=2
	ArmorBottom=6
	ArmorRight=2
	ArmorLeft=2
[end]

Armor=0
LifeRate=50000
LifeRateFrag=5000
Firing=0.0

energyloss="",true,0.7,1000 //     , true -       -,       ,        
energyloss="gun0",true,5.0,20000 // 
energyloss="gun1",true,5.0,20000 // 

[DGroup=MachineGun1]
	IsCritical=false
	LifeK=20
	convex="~gun_4",5,600,"MT_ARMOR"
	[SphereHitArmorBox]
		FovH=90
		FovV=90
		ArmorFront=5
		ArmorBack=15
		ArmorTop=5
		ArmorBottom=7
		ArmorRight=5
		ArmorLeft=5
	[end]
	LifeRateFrag=600
	RepairSpeed=0.0166667	// (1 )
	RepairSource=4
	InstantRepair=true
[end]

[DGroup=MachineGun2]
	IsCritical=false
	LifeK=20
	convex="~gun_5",5,600,"MT_ARMOR"
	[SphereHitArmorBox]
		FovH=90
		FovV=90
		ArmorFront=5
		ArmorBack=15
		ArmorTop=5
		ArmorBottom=7
		ArmorRight=5
		ArmorLeft=5
	[end]
	LifeRateFrag=600
	RepairSpeed=0.0166667	// (1 )
	RepairSource=4
	InstantRepair=true
[end]

OpenCockpitArg=22011
canopyLockSoundMask=9 	// 0 bit - canopy unlock, start
						// 1 bit - canopy unlock, end
						// 2 bit - canopy lock, start
						// 3 bit - canopy lock, end
NoAimingWhenOpened=false

AttackDistance   = 1500.0		//AI max aim distance versus ground point
AttackDistanceTrgGnd = 1500.0	//AI max aim distance versus ground target
AttackDistanceTrgAir = 1200.0		//AI max aim distance versus air target

AIStartAimErrModifier = 0.1		//Modifier for AI initial bracketing aim error (reduced twice with each shot)

AIAimDelayModifier = 0.1		//Modifier for AI delay before start to aim to a new target at 1000m range

ReArmTime=15 //  60,     -2  2 
NoClipParent = true //  true,     /